/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.opensource.jdom.taggen.html.tag;

import org.opensource.jdom.taggen.html.CommonAttributes;

/**
 * A region of a client-side image map. Used in conjunction with map to map 
 * links to certain regions of an image.
 * 
 * <h2>Example</h2> <pre><code class="html">
 * &lt;map id ="atlas"&gt;
 * <strong>&lt;area shape ="rect" coords ="0,0,115,90" href ="northamerica.html" alt="North America" /&gt;</strong>
 * <strong>&lt;area shape ="poly" coords ="113,39,187,21,180,72,141,77,117,86" href ="europe.html" alt="Europe" /&gt;</strong>
 * <strong>&lt;area shape ="poly" coords ="119,80,162,82,175,102,183,102,175,148,122,146" href ="africa.html" alt="Africa" /&gt;</strong>
 * &lt;/map&gt;
 * </code></pre>
 *
 * @see Map
 * @author sergio.valdez
 */
public class Area extends CommonAttributes{

    /**
     * is used to specify the alternative text of the area, which should be
     * a short description.
     */
    private String alt;
    /**
     * can be used to specify the shape of the area. The value can be rect
     * (rectangular), circle (circular), poly (polygonal) or default.
     */
    private String shape;
    /**
     * can be used to specify the pixel coordinates of the area. For rectangular
     * shapes, this is a comma-separated list of four values for left, top,
     * right and bottom (eg. coords="0,0,50,50"). For circular shapes this is a
     * comma-separated list of three values for left, top and radius
     * (eg. coords="50,50,25"). For polygonal shapes, this is a comma-separated
     * list containing an even number of values, specifying the left and top of
     * each point of the shape (eg. coords="0,0,25,25,50,25,50,100").
     */
    private String coords;
    /**
     * can be used to specify the target of the area link.
     */
    private String href;
    /**
     * can be used to specify that the area is not a link. It must be used in
     * the format nohref="nohref".
     */
    private String nohref;
    /**
     * can be used to associate a keyboard shortcut to the area.
     */
    private String accesskey;
    /**
     * can be used to specify where the area appears in the tab order of the
     * page.
     */
    private String tabindex ;

    public Area(String alt) {
        this.alt = alt;
    }

    /**
     * is used to specify the alternative text of the area, which should be
     * a short description.
     * @return the alt
     */
    public String getAlt() {
        return alt;
    }

    /**
     * is used to specify the alternative text of the area, which should be
     * a short description.
     * @param alt the alt to set
     */
    public void setAlt(String alt) {
        this.alt = alt;
    }

    /**
     * can be used to specify the shape of the area. The value can be rect
     * (rectangular), circle (circular), poly (polygonal) or default.
     * @return the shape
     */
    public String getShape() {
        return shape;
    }

    /**
     * can be used to specify the shape of the area. The value can be rect
     * (rectangular), circle (circular), poly (polygonal) or default.
     * @param shape the shape to set
     */
    public void setShape(String shape) {
        this.shape = shape;
    }

    /**
     * can be used to specify the pixel coordinates of the area. For rectangular
     * shapes, this is a comma-separated list of four values for left, top,
     * right and bottom (eg. coords="0,0,50,50"). For circular shapes this is a
     * comma-separated list of three values for left, top and radius
     * (eg. coords="50,50,25"). For polygonal shapes, this is a comma-separated
     * list containing an even number of values, specifying the left and top of
     * each point of the shape (eg. coords="0,0,25,25,50,25,50,100").
     * @return the coords
     */
    public String getCoords() {
        return coords;
    }

    /**
     * can be used to specify the pixel coordinates of the area. For rectangular
     * shapes, this is a comma-separated list of four values for left, top,
     * right and bottom (eg. coords="0,0,50,50"). For circular shapes this is a
     * comma-separated list of three values for left, top and radius
     * (eg. coords="50,50,25"). For polygonal shapes, this is a comma-separated
     * list containing an even number of values, specifying the left and top of
     * each point of the shape (eg. coords="0,0,25,25,50,25,50,100").
     * @param coords the coords to set
     */
    public void setCoords(String coords) {
        this.coords = coords;
    }

    /**
     * can be used to specify the target of the area link.
     * @return the href
     */
    public String getHref() {
        return href;
    }

    /**
     * can be used to specify the target of the area link.
     * @param href the href to set
     */
    public void setHref(String href) {
        this.href = href;
    }

    /**
     * can be used to specify that the area is not a link. It must be used in
     * the format nohref="nohref".
     * @return the nohref
     */
    public String getNohref() {
        return nohref;
    }

    /**
     * can be used to specify that the area is not a link. It must be used in
     * the format nohref="nohref".
     * @param nohref the nohref to set
     */
    public void setNohref(String nohref) {
        this.nohref = nohref;
    }

    /**
     * can be used to associate a keyboard shortcut to the area.
     * @return the accesskey
     */
    public String getAccesskey() {
        return accesskey;
    }

    /**
     * can be used to associate a keyboard shortcut to the area.
     * @param accesskey the accesskey to set
     */
    public void setAccesskey(String accesskey) {
        this.accesskey = accesskey;
    }

    /**
     * can be used to specify where the area appears in the tab order of the
     * page.
     * @return the tabindex
     */
    public String getTabindex() {
        return tabindex;
    }

    /**
     * can be used to specify where the area appears in the tab order of the
     * page.
     * @param tabindex the tabindex to set
     */
    public void setTabindex(String tabindex) {
        this.tabindex = tabindex;
    }


}
